package org.datastealer.controller;

import org.datastealer.bean.Schema;
import org.datastealer.service.SchemaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Note：
 *
 * @author ：mengjw
 * @description：数据库Schema控制层
 * @date ：Created in 2020/8/23
 */
@RestController
@RequestMapping("/datastealer")
public class SchemaController {

    @Autowired
    private SchemaService schemaService;

    @GetMapping("/schema")
    public List<Schema> getAllSchemas() {
        return schemaService.getAllSchemas();
    }

}